<template>
    <div class="com-cnt">
        <div class="tab">
            <ul class="clearfix">
                <li class="fl">日期</li>
                <li class="fl">金额</li>
                <li class="fl">银行卡号</li>
                <li class="fl">状态</li>
            </ul>
        </div>
        <div class="tabs" v-if="list.length !== 0">
            <ul class="clearfix" v-for="lists in list">
                <li class="fl">{{lists.strOT.substring(0, 10)}}</li>
                <li class="fl">{{lists.turnover}}</li>
                <li class="fl">{{bank}}</li>
                <li class="fl" v-if="lists.status==0">成功</li>
                <li class="fl" v-if="lists.status==1">申请中</li>
                <li class="fl" v-if="lists.status==-1">申请失败</li>
            </ul>
        </div>
        <div class="tips" v-if="list.length==0">
            <img src="../../assets/imgs/member/tips-3.png" alt="">
            <p>您暂无提现记录～</p>
        </div>
    </div>
</template>

<script>
import http from "@/assets/js/axios"
import { domain } from '@/assets/js/config'
import $ from 'jquery'
import { maskTips } from '@/assets/js/dom'
export default {
    data() {
        return {
            userToken: '',
            bank: '',
            list: [],
            parms: {
                dataType: 2
            },
            emptyimg: {
                backgroundImage: "url(" + require("@/assets/imgs/manage/yeempty.png") + ")",
                backgroundRepeat: "no-repeat",
                backgroundSize: "100%",
                marginTop: "5px"
            }
        }
    },
    components: {

    },
    mounted() {
        let userToken = localStorage.getItem("token") || ''
        this.userToken = userToken
        if (!this.userToken) {
            this.$router.push('/login')
        }
        this.getReason();
    },
    methods: {
        direct: function (val) {
            this.$router.push({ path: '/' + val });
        },
        // 余额明细
        getReason: async function () {
            let that = this
            let userInfo = JSON.parse(sessionStorage.getItem('UserInfo'));
            let userToken = localStorage.getItem("token") || ''
            const res = await http.post('/xshk/f/assetsStream/putAmount?token=' + userToken, this.parms)
            console.log(res);

            if (res.status == 200) {
                if (res.data.data) {
                    this.list = res.data.data.list;
                    this.bank = res.data.data.bankId;
                } else {
                    this.list = []
                }

            }
        }
    }
}
</script>

<style  lang="stylus" scoped>
.com-cnt {
    div.tab {
        padding: 10px 15px;
        border-bottom: 1px solid rgba(240, 240, 240, 1);

        ul {
            text-align: center;

            li {
                width: 25%;
                font-size: 14px;
                font-family: PingFangSC-Regular;
                font-weight: 400;
                color: rgba(153, 153, 153, 1);
            }
        }
    }

    div.tabs {
        padding: 10px 15px;

        ul {
            text-align: center;
            margin: 10px 0;

            li {
                width: 25%;
                font-size: 12px;
                font-family: PingFangSC-Regular;
                font-weight: 400;
                color: rgba(51, 51, 51, 1);
            }
        }
    }

    .tips {
        margin-top: 50px;
        width: 100%;
        text-align: center;
        font-size: 16px;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: rgba(221, 221, 221, 1);

        img {
            width: 150px;
            height: 150px;
        }
    }
}
</style>
